//
// Created by liushuai on 2021/2/25.
//

#include "minMoves.h"

int minMoves(vector<int>& nums) {
    int res = 0;
    int min = *std::min_element(nums.begin(),nums.end());
    for(auto e:nums){
        res+=e-min;
    }
    return res;
}